Optimal. Leaf size=27 \[ \frac{A \tanh ^{-1}(\sin (c+d x))}{d}+B x+\frac{C \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0521309, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {3023, 2735, 3770} \[ \frac{A \tanh ^{-1}(\sin (c+d x))}{d}+B x+\frac{C \sin (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3023
Rule 2735
Rule 3770
Rubi steps
\begin{align*} \int \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx &=\frac{C \sin (c+d x)}{d}+\int (A+B \cos (c+d x)) \sec (c+d x) \, dx\\ &=B x+\frac{C \sin (c+d x)}{d}+A \int \sec (c+d x) \, dx\\ &=B x+\frac{A \tanh ^{-1}(\sin (c+d x))}{d}+\frac{C \sin (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.0198298, size = 38, normalized size = 1.41 \[ \frac{A \tanh ^{-1}(\sin (c+d x))}{d}+B x+\frac{C \sin (c) \cos (d x)}{d}+\frac{C \cos (c) \sin (d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.032, size = 41, normalized size = 1.5 \begin{align*} Bx+{\frac{A\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{Bc}{d}}+{\frac{C\sin \left ( dx+c \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.973572, size = 49, normalized size = 1.81 \begin{align*} \frac{{\left (d x + c\right )} B + A \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + C \sin \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.89053, size = 120, normalized size = 4.44 \begin{align*} \frac{2 \, B d x + A \log \left (\sin \left (d x + c\right ) + 1\right ) - A \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, C \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (A + B \cos{\left (c + d x \right )} + C \cos ^{2}{\left (c + d x \right )}\right ) \sec{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.21668, size = 95, normalized size = 3.52 \begin{align*} \frac{{\left (d x + c\right )} B + A \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - A \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) + \frac{2 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]